<? ini_set('memory_limit','10000M');?>
<style>
body { margin-top:25; font-size:12px;}
		.b_line { border-bottom:1px #AAAAAA solid; height:25px; font-size:14px}
		.border_t{border-top:1px inset #EEE;}
		.border_b{border-bottom:1px inset #EEE;}
		.border_l{border-left:1px inset #EEE;}
		.border_r{border-right:1px inset #EEE;}
		.xx:hover {cursor:pointer; background:#99FF99;}
		.xy:hover {cursor:pointer; background:#F30;}
		.box{border:0.5px solid #003}
		.box_t{border-top:1px solid #003;}
		.box_lbr{border:1px solid #003; border-top:none}
		.box_ltr{border:1px solid #003; border-bottom:none}
		.box_l{border-left:1px solid #003;}
		.box_r{border-right:1px solid #003;}
		.box_lb{border-left:1px solid #003;border-bottom:1px solid #003;}
		.box_rb{border-right:1px solid #003;border-bottom:1px solid #003;}
		.list_genap{cursor:pointer; background-color:#6699FF;}
		.list_ganjil{cursor:pointer; background-color:#9966FF;}
		.list_closed{cursor:pointer; background-color:#FF99FF;}
</style>
<body>
<table width='100%' style="border-collapse:collapse">
<tr><td colspan='34' align='center'><b>LIST ABSENSI BULAN <?=nBulan($bln)." ".$thn;?> </b></td></tr>
<tr><td colspan='34' align='center'>Lokasi :<?=$id_lokasi?></td></tr>
<?
$content=''; $n=0;

		$content= tr('alist_genap').
				  td('No.','3%',true,'box','center',"rowspan='2'").
				  td('NIK','5%',true,'box','center',"rowspan='2'").
				  td('Nama Karyawan','15%',true,'box','center',"rowspan='2'");
			for ($x=1;$x<=31;$x++)
			{
				$content.= td(str_repeat('0',(2-strlen($x))).$x,'4%',true,'box','Center',"colspan='2'");
			}
		$content.= _tr(true);
		$content.= tr('list_genap');//.td('','',false,'box').td('','',false,'box').td('','',false,'box');
		for ($x=1;$x<=31;$x++)
		{
			$content.= td("Kerja",'4%',true,'box','Center').td("OT",'4%',true,'box','Center');
		}
		$content.= _tr(true);
		
		foreach($lst_usr as $r)
		{
			$n++;
			$content.=  tr().td(($cari=='')?$n:$r->bln,'',false,'box','center').
				 td($r->nik_employee,'',false,'box','center').
				 td(strtoupper($r->nm_employee),'',false,'box','left');
				 for($i=1;$i<=31;$i++)
				 {
					 $nam="d_$i";$ot="t_$i";
					$content.=  td($r->$nam,'',false,'box','center').
						 td($r->$ot,'',false,'box','center'); 
				 }
				 
			$content.=   _tr();
		}
		echo $content;
?>
</tbody>
</table>
</body>